﻿using System.Threading.Tasks;
using com.IronOne.BoardPACWinAppUtil.Enums;
using SQLite;

namespace com.IronOne.BoardPACWinAppDAO.DbOperations
{
    public interface IDbOperations
    {
        bool CreateGeneralDatabase();
        Task<bool> CreateUserDatabase(int userId);
        Task<bool> IsUserDatabaseExists(string name);
        Task<bool> IsGeneralDatabaseExists();
        SQLiteAsyncConnection GetAsyncConnection(DbConnectionType connectionType);
        SQLiteConnection GetSyncConnection(DbConnectionType connectionType);
        Task<SQLiteAsyncConnection> GetAsyncConnectionOffline(DbConnectionType connectionType, int? userId);
        bool CloseAllConnections();
    }
}